package com.ibangnuo.api.terminal;

import com.ibangnuo.framework.domain.Terminal;
import com.ibangnuo.framework.model.response.ObjectResult;
import com.ibangnuo.framework.model.response.QueryResponseResult;
import com.ibangnuo.framework.model.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;

import java.util.Map;

/**
 * @Author:ly
 * @Data:2020/1/2 11:58
 * @Verdion:1.0
 */
@Api(value = "器具管理", description = "器具管理的增删改查")
public interface TerminalControllerApi {

    @ApiOperation("器具查询")
    QueryResponseResult query(Map map);


    @ApiOperation("门店名称查询")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "商户id", required = true, paramType = "path", dataType = "String")
    })
    QueryResponseResult query();


    @ApiOperation("器具的添加")
    QueryResponseResult addTerminal(Map map);

    @ApiOperation("器具的删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "器具id", required = true, paramType = "path", dataType = "String")
    })
    QueryResponseResult delTerminal(String id);

    @ApiOperation("器具信息的回显")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "器具id", required = true, paramType = "path", dataType = "String")
    })
    QueryResponseResult findById(String id);


    @ApiOperation("器具编辑")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "number", value = "编号", required = true, paramType = "path", dataType = "String"),
            @ApiImplicitParam(name = "SN", value = "SN", required = true, paramType = "path", dataType = "String"),
            @ApiImplicitParam(name = "name", value = "所属门店", required = true, paramType = "path", dataType = "String")
    })
    QueryResponseResult  upTerminal(Map  map);

    /**
     * @Author wwy
     * @param sn
     * @return
     */
    @ApiOperation("授权查询")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "sn", value = "器具sn", required = true, paramType = "path", dataType = "String")
    })
    ObjectResult findPidBySnNum(String sn);

    @ApiOperation("门店查询")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "sn", value = "器具sn", required = true, paramType = "path", dataType = "String")
    })
    ObjectResult findShopBySnNum(String sn);

    @ApiOperation("器具添加新版")
    ResponseResult addNew(Terminal terminal);

    @ApiOperation("器具查询新版")
    QueryResponseResult findByListNew(Map map);

    @ApiOperation("器具查询新版")
    QueryResponseResult findListNew2(Map map);
}
